package com.moter.demo01.io.in_outputstream.objectstream;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.SequenceInputStream;
import java.util.Collections;
import java.util.Enumeration;

public class ObjectInputStreamDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        ObjectInputStream objectInputStream = new ObjectInputStream(new FileInputStream("src\\main\\java\\com\\moter\\demo01\\io\\in_outputstream\\objectstream\\object1.txt"));
        ObjectOutputStreamDemo.Person o = (ObjectOutputStreamDemo.Person)objectInputStream.readObject();
        System.out.println(o.toString());
        objectInputStream.close();
        Collections.emptyEnumeration();

    }
}
